Function Reference

_TS_TaskPropertiesSet

Sets the properties of a Tasks object (Task Definition, RegisteredTask, Action or Trigger).

#Include <TaskScheduler.au3>
_TS_TaskPropertiesSet(ByRef $oObject, $aProperties)

 

Parameters

$oObject Object of a Task Definition, RegisteredTask, Action or Trigger
$aProperties one-dimensional zero based array in the following format: "object name|property name|property value"
Name of the object to process. Valid are: TASK, DEFINITION, PRINCIPAL, REGISTRATIONINFO, SETTINGS, IDLESETTINGS, NETWORKSETTINGS, TRIGGERS, REPETITION and ACTIONS
Name of the property to set
Value for the property to set

 

Return Value

Success: 1
Failure: 0, sets @error to:
    2001 - Unsupported or invalid Task Scheduler COM object
    2002 - Unsupported or invalid property name. @extended is set to the zero based index of the property in error
    2003 - The row in $aProperties does not have the required format: "object name|property name|property value". @extended is set to the index of the row in error.
    2004 - $oObject is invalid. Must be: TaskDefinition, RegisteredTask, Trigger or Action

 

Remarks

Sections that are not valid for the passed object are ignored!
E.g. The "Task" section and its properties are only valid for a RegisteredTask object

 

Related

 

Example


#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker
#AutoIt3Wrapper_AU3Check_Stop_OnWarning=y
#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

#include <MsgBoxConstants.au3>

MsgBox($MB_ICONINFORMATION, "Task Scheduler UDF", "Please check example script _TS_TaskCreate.au3 for an example!")